import java.util.Scanner;

public class demo1 {
    public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);
        while (scanner.hasNext()){
            String s=scanner.nextLine();//hello world
          int index=s.lastIndexOf(" ");
            int len=s.substring(index+1,s.length()).length();
            System.out.println(len);
        }
        scanner.close();
    }
}
